package com.ybox.gateway.service;

import cloud.tianai.captcha.common.constant.CaptchaTypeConstant;
import cloud.tianai.captcha.spring.application.ImageCaptchaApplication;
import cloud.tianai.captcha.spring.plugins.secondary.SecondaryVerificationApplication;
import cloud.tianai.captcha.spring.vo.CaptchaResponse;
import cloud.tianai.captcha.spring.vo.ImageCaptchaVO;
import cloud.tianai.captcha.validator.common.model.dto.ImageCaptchaTrack;
import com.ybox.common.core.exception.CaptchaException;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 验证码实现处理
 *
 * @author ych
 */
public interface ValidateSwipeService {


    /**
     * 生成验证码
     */
    public CaptchaResponse<ImageCaptchaVO> createCaptcha(String type);

    /**
     * 校验验证码
     */
    public Boolean checkCaptcha(String id, ImageCaptchaTrack imageCaptchaTrack);

    /**
     * 二次验证，一般用于机器内部调用，这里为了方便测试
     *
     * @param id id
     * @return boolean
     */
    public Boolean check2Captcha(String id);
}
